 
import QtQuick 1.0
//import com.kdeadmouse.qmlcomponents.VideoService 1.0
import "/home/manu/QT/sources/cloud/googleSrc/socialwebmediacenter/qmlPlugins/videoservice-build-desktop" 1.0

//import VideoServicedsdfsdfs 1.0

Rectangle {

    id: window
    color: "steelblue"
    width: 680 
    height: 200
    ShellInvoke {
      id:invoker
    }
    ListView {
	    id: list1
	    anchors.centerIn: window
	    orientation:ListView.Horizontal
	    focus: true
            model:ApplicationModel{}
	    anchors.fill: parent
	    anchors.topMargin : 40
	    anchors.leftMargin : 80
	    spacing: 150
	    delegate: 
		Rectangle {
		    id: content
		    //anchors.centerIn: parent //; width: container.width - 40; height: container.height - 10
		    //color: "transparent"
		    smooth: true
		    radius: 10
		    
		    //Rectangle { anchors.fill: parent; anchors.margins: 3; color: "#91AA9D"; smooth: true; radius: 8 }

		    Image {id:img; source: icone;  smooth: true ; width:100 ; height:100}
		    
		    states: State {
			name: "active"; when: activeFocus
			PropertyChanges { target: img ; scale: 1.5 }
		    }

		    transitions: Transition {
			NumberAnimation { properties: "scale"; duration: 300 }
		    }
		    
		    Keys.onPressed: {
			if (event.key == Qt.Key_Return) {
			    if(qml != null){
			      rootContainer.loadNewQml(qml);
			      event.accepted = true;
			      return;
			    }else if(shell!=null){
			      //rootContainer.toggleVisibility();
			      invoker.shellAction(shell,
				      [arg1]);
			      event.accepted = true;
			      return;
			    }
			    console.log("selected ############:"  + currentIndex );
			    event.accepted = true;
			}
		    }
		}
	}

    

}